package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProcessingDeliveryLetterMapper;
import com.ruoyi.system.domain.ProcessingDeliveryLetter;
import com.ruoyi.system.service.IProcessingDeliveryLetterService;

/**
 * 加工发货函Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-30
 */
@Service
public class ProcessingDeliveryLetterServiceImpl implements IProcessingDeliveryLetterService {
    @Autowired
    private ProcessingDeliveryLetterMapper processingDeliveryLetterMapper;

    /**
     * 查询加工发货函
     *
     * @param keyId 加工发货函主键
     * @return 加工发货函
     */
    @Override
    public ProcessingDeliveryLetter selectProcessingDeliveryLetterByKeyId(Long keyId) {
        return processingDeliveryLetterMapper.selectProcessingDeliveryLetterByKeyId(keyId);
    }

    /**
     * 查询加工发货函列表
     *
     * @param processingDeliveryLetter 加工发货函
     * @return 加工发货函
     */
    @Override
    public List<ProcessingDeliveryLetter> selectProcessingDeliveryLetterList(ProcessingDeliveryLetter processingDeliveryLetter) {
        return processingDeliveryLetterMapper.selectProcessingDeliveryLetterList(processingDeliveryLetter);
    }

    /**
     * 新增加工发货函
     *
     * @param processingDeliveryLetter 加工发货函
     * @return 结果
     */
    @Override
    public int insertProcessingDeliveryLetter(ProcessingDeliveryLetter processingDeliveryLetter) {
        return processingDeliveryLetterMapper.insertProcessingDeliveryLetter(processingDeliveryLetter);
    }

    /**
     * 修改加工发货函
     *
     * @param processingDeliveryLetter 加工发货函
     * @return 结果
     */
    @Override
    public int updateProcessingDeliveryLetter(ProcessingDeliveryLetter processingDeliveryLetter) {
        return processingDeliveryLetterMapper.updateProcessingDeliveryLetter(processingDeliveryLetter);
    }

    /**
     * 批量删除加工发货函
     *
     * @param keyIds 需要删除的加工发货函主键
     * @return 结果
     */
    @Override
    public int deleteProcessingDeliveryLetterByKeyIds(Long[] keyIds) {
        return processingDeliveryLetterMapper.deleteProcessingDeliveryLetterByKeyIds(keyIds);
    }

    /**
     * 删除加工发货函信息
     *
     * @param keyId 加工发货函主键
     * @return 结果
     */
    @Override
    public int deleteProcessingDeliveryLetterByKeyId(Long keyId) {
        return processingDeliveryLetterMapper.deleteProcessingDeliveryLetterByKeyId(keyId);
    }
}
